<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>iphone XX</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        body {
            background-color: #aaa;
        }
        /* 手机外壳属性设置 */
        .iphone {
            position: relative;
            width: 300px;
            height: 600px;
            margin: 50px auto;
            border: 10px solid #3b3b3b;
            background-color: #2e2e2e;
            border-radius: 50px;
            box-shadow: 3px 5px 5px 0px rgba(0, 0, 0, 0.5);
        }
        /* 手机开关机按钮 及音量键按钮 */
        .iphone:first-child::before {
            content: '';
            position: absolute;
            width: 66px;
            height: 6px;
            right: 60px;
            top: -16px;
            background-color: #2e2e2e;
        }
        .iphone:first-child::after {
            content: '';
            position: absolute;
            width: 6px;
            height: 45px;
            left: -16px;
            top: 88px;
            background-color: #2e2e2e;
        }
        /* 听筒 */
        div :nth-child(1) {
            position: absolute;
            width: 6px;
            height: 6px;
            left: 50%;
            margin-left: -10px;
            top: 25px;
            border: 3px solid #4a4a4a;
            background-color: #1a1a1a;
            border-radius: 50%;
            box-shadow: 2px 2px 5px 0px rgba(0, 0, 0, 0.5);
        }
        div :nth-child(2) {
            position: absolute;
            width: 60px;
            height: 5px;
            left: 50%;
            margin-left: -38px;
            top: 45px;
            border: 5px solid #4a4a4a;
            background-color: #1a1a1a;
            border-radius: 10px;
        }
        /* 主屏幕 */
        div :nth-child(3){
            width: 250px;
            height: 450px;
            text-align: center;
            line-height: 450px;
            margin: 73px auto;
            border: 5px solid #1a1a1a;
            color: #fff;
            font-size: 26px;
            background-color: #0a0a0a;
        }
        /* 手机Home键 */
        div :nth-child(4) {
            position: absolute;
            width: 50px;
            height: 50px;
            left: 50%;
            margin-left: -25px;
            bottom: 9px;
            background-color: #1a1a1a;
            border-radius: 50%;
        }
        div :nth-child(4)::before {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            left: 13px;
            top: 12px;
            border: 2px solid rgba(255, 255, 255, 0.7);
            border-radius: 3px;
            
        }
    </style>
</head>
<body>
    <!-- 手机外壳 -->
    <div class="iphone">
        <!-- 听筒 -->
        <div class="hook"></div>
        <!-- 扬声器 -->
        <div class="music"></div>
        <!-- 主屏幕 -->
        <div class="scrn">iphone XX</div>
        <!-- 手机home键 -->
        <div class="home"></div>
    </div>
</body>
</html>